#include<stdio.h>
int main()
{
	int m;
	for (m = 1;m <= 100;m++)
	{
		if(m%3==0)
		{
			printf("%d\n", m);
		}
	}
	return 0;
}